package com.example.demo.sevice.impl;

import com.example.demo.bean.Department;
import com.example.demo.dao.DepartmentDao;
import com.example.demo.sevice.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DepartmentImpl implements DepartmentService {
    @Autowired
    private DepartmentDao departmentDao;

    /*查询*/
    @Override
    public List<Department> department() {
        return departmentDao.department();
    }

    /*新增*/
    @Override
    public void insert(String department) {
        departmentDao.insert(department);
    }

    /*删除*/
    @Override
    public void delete(String department) {
        departmentDao.delete(department);
    }

    /*修改*/
    @Override
    public void update(Department department) {
        departmentDao.update(department);
    }
}
